Accelerated trade matching using speculative parallel processing

ABSTRACT

An electronic trading system is configured to create speculative orders based on real orders. The speculative order differs from the real order by the price, quantity, or the type of financial instrument. The match engine chooses one or more speculative orders in an attempt to predict the next real order. Even though processing multiple trades at the same time is impossible, the use of speculative orders can permit the match engine to perform the calculations involved with the trade and generate the messages associated with the trade ahead of time. If the prediction was correct and the next order received by the match engine corresponds to one of the speculative orders, some of the matching activity has already been performed. This in effect, allows the match engine to process trades more efficiently and increases the total trading volume that can be handled by the electronic trading system.

REFERENCE TO RELATED APPLICATIONS

This application is a continuation under 37 C.F.R. § 1.53(b) of U.S. patent application Ser. No. 12/560,185 filed Sep. 15, 2009 (Attorney Docket No. 4672/09740BUS) now U.S. Pat. No. ______, hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The present invention relates to software, systems and methods for electronic trading in a commodities exchange, derivatives exchange or similar business involving tradable items where orders from buyers are matched with orders from sellers.

BACKGROUND

Electronic trading systems accept bids and offers in the form of orders, which are also referred to as real orders because they consist of data entered by traders either directly or by computing devices under their control. Based on the nature of the exchange, electronic trading systems generally perform matching using the following procedure. First, a new request is received. The request may be an order, an order modification, or an order cancellation. Second, the new request is evaluated against the existing order book and matching is performed, if possible. Third, once processing has been finished, messages are sent out to notify the marketplace of the actions performed, which updates the current state of the market. Finally, the electronic trading system checks to see if there is any quantity remaining to be rested on the order book.

This sequence is mandated by the business rules used by electronic trading systems to ensure market integrity. It is a requirement that orders be matched in a one-at-a-time serialized manner.

Of these steps or sequence, the preparation and communication of messages has been found to require the great amount of processing time. For example, messages corresponding to each of the executed trades need to be built and sent out. Since traders need to be able to respond to the events generated, these actions must be completely executed before processing of the next request can begin.

Exchanges that host electronic trading systems using match engines are constantly striving to shorten their response time and thus increase the number of matches performed per unit of time. At some point, performance optimizations options based upon the single threaded matching logic and code will be exhausted. A need for a fundamental architectural change arises.

What is needed is an approach that could significantly improve the performance of order matching, especially at peak times, when a burst of orders is received by the trading engine.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a block diagram of an electronic trading system.

FIG. 2 illustrates a symmetric multiprocessing implementation of a portion of the electronic trading system of FIG. 1.

FIG. 3 illustrates a grid computing implementation of a portion of the electronic trading system of FIG. 1.

FIG. 4 illustrates a cloud computing implementation of a portion of the electronic trading system of FIG. 1.

FIG. 5 illustrates a timing diagram of accelerated trade matching using speculative parallel processing.

FIG. 6 illustrates a flow chart of one embodiment of accelerated trade matching using speculative parallel processing.

FIG. 7 illustrates another embodiment of accelerated trade matching using speculative parallel processing.

DETAILED DESCRIPTION OF THE DRAWINGS AND PRESENTLY PREFERRED EMBODIMENTS

When a real order is received at a price level, a match engine calculates tradable combinations involving the real order. A matched order is calculated from the tradable combinations according to a matching algorithm. After the order matching activity is finished, the state of the order book may be determined.

The nature of the business of electronic trading system is that a transparent marketplace must be maintained. When trading entities send in orders, they expect that the orders will be matched against the market that they can see on the order books made available to the public. The exchange may publish allocation algorithms that set forth how trades are filled. For example, a first in first out (FIFO) algorithm, a proration per quantity algorithm, or a market maker priority algorithm may be used depending on the market.

In any case, multiple trades executing for the same type of financial instrument at the same time is impossible. Orders must be processed one at a time. Consequently, the electronic trading system cannot take advantage of some technologies that increase computational power using parallel processing or distributed computing.

However, multiple parallel processing threads may be launched by one or more match engines to calculate possible future matched trades involving speculative orders. The speculative orders may be based on varying the price levels of real orders or by changing other criteria of real orders, such as quantity or the type of instrument. In choosing the speculative orders, the match engine may select prices randomly or attempt to predict conditions in the future based on current market conditions.

If the next order (or a subsequent order) received by the match engine is for the same criteria as would used for one of the speculative orders, some of the matching activity has already been performed. This in effect, allows parallel matching, but the results are emitted only based on the actual incoming received orders. The new order can be instantaneously traded when it matches a speculative order.

Therefore, in a scenario where the next order matches one of these pre-calculated and pre-generated trades, the time required to send out the messaging for these trades would be reduced and potentially faster order response times could be achieved. Further, the power of parallel processing may be utilized, while guaranteeing that responses are sent in the proper order with respect to the sequence in which the requests were received.

FIG. 1 illustrates a block diagram of an electronic trading system. The electronic trading system includes a match engine 100 coupled with terminals 107. The match engine 100 includes a gatekeeper module 105, a first matcher module 101, and a second matcher module 103. The first matcher module 101 operates independently of the second matcher module 103. The first matcher module 101 may be assigned tasks associated with a real order received from one of the terminal 107, and the second matcher module 103 may be assigned tasks associated with a speculative order. As used herein, the phrase “coupled with” is defined to mean directly connected to or indirectly connected through one or more intermediate components. Such intermediate components may include both hardware and software based components.

The match engine 100 may be implemented as a hardware or software. Match engine 100 may include one or more computers including at least a memory, a communication interface, and a processor. Alternatively, the match engine 100 may be implemented as a combination of hardware and software. The market data server may be implemented with hardware or software as part of the match engine 100. Alternatively, the market data server may be a database or computer coupled with match engine 100.

Terminals 107 may include a memory, an interface, a processor, and operating firmware/software that perform functions, such as receiving input from a user, generating and transmitting instructions to place a request or order and receiving a response to those instructions. Terminal 107 may be a conventional computer, a hybrid personal computer, a personal digital assistant (PDA), a laptop computer, a mobile telephone or any other device that can receive and send information through a communication link. Terminal 107 may also include a display device, a keyboard, a mouse, a touch panel, a graphical user interface (GUI), a printer, a scanner, and/or other input/output devices associated with a computer for interacting with a user of the terminal 107. In one embodiment, terminal 107 is a personal computer having a Pentium class processor, a suitable memory, hard disk and user interface and a network interface.

Real orders may be entered for any tradable financial instrument available on the exchange. For example, the real order may be a bid or offer for any listed futures contracts, options, inter-commodity spreads, intra-commodity spreads, futures strips, calendar spreads, butterfly spreads, condor spreads, crack spreads, straddles, and strangles.

An order (or message based on the order) is sent by a market participant by way of terminals 107 to match engine 100. The gatekeeper module 105 receives the incoming order and determines what actions are to be taken. The gatekeeper module 105 launches one or more of the matcher modules 101 and 103 as necessary. The first matcher module 101 is configured to perform the calculations related to the trades and generation of the outgoing messages and updates based on the real order and the current known state of the order book. The second matcher module 103 is configured to perform the calculations related to the trades and generation of the outgoing messages and updates based on the speculative order. In addition, the second matcher module 103 may be configured to perform the calculations and generate the outgoing messages based on the state of the order book that is known to occur when the real order has cleared.

The outgoing messages may include a variety of different types of messages. For example, messages may be sent to the two or more trading entities. These messages include the order, the price of the order, and optionally the parties of the trade. A message may be sent to the clearing portion of the exchange. This message includes the order, the price of the order, and the trading entities. Messages may be sent to a market data server to notify everyone in the marketplace that a trade occurred at this price and quantity for this financial instrument. The market data server may be coupled with terminals 107 to publish market data to the marketplace.

The speculative order may be based on the most recent real order. For example, the speculative order may be for the same financial instrument and same quantity as the real order but at a price one tick higher or lower than the real order. A tick is the minimum amount, established by the exchange or otherwise configured in the electronic trading system that a price of a financial instrument may fluctuate in either direction.

Match engine 100 may determine the price of the speculative order based on a variety of factors: a current market trend, an overall market trend, an economic indicator, a scheduled market event or a financial announcement.

The trend of the current market of the financial instrument may provide a good indication of where the market will go in the immediate future. For example, in some markets, a day of falling prices probably reasonably predicts that prices will continue to fall at least for the short run. In this case, match engine 100 may determine that the speculative order is priced one or more ticks below the most recent real order.

More specifically, a statistical analysis based on the analysis of the price distribution for the financial instrument may be used. For example, the average price over a time window. The time window may be daily, weekly, yearly or any other period of time. Alternatively, the standard deviation of the price over a time window may be used.

The overall market trend may provide a good indication of the direction of the market for an individual financial instrument in the immediate future. This may especially be true for financial instruments that have a small trading volume. The match engine 100 may determine that the speculative order is priced to follow the general trend of the overall market.

Economic indicators may also give clues to the future prices of a financial instrument. Economic indicators include unemployment rates, interest rates, and indices related to a particular market sector.

A scheduled market event or financial announcement may be used by match engine 100 to determine the price of the speculative order. A listing and schedule of market events is presently published by CME Group at http://www.cmegroup.com/tools-information/calendars/index.html. Financial announcements may include federal rate announcement, release of unemployment numbers, inventory announcement, as well as other announcements.

In another embodiment, match engine 100 may define the speculative order by varying quantity or the type of financial instruments according to any one or more of the above factors. This can be done in additionally or alternatively to the price of the speculative order.

The match engine 100 may employ any number of matchers to perform calculations and generate trades based on speculative orders. In one example, match engine 100 includes eleven matcher modules. One matcher module performs the calculations and generates the messages involved with the real order. The match engine 100 assigns prices to ten speculative orders from five ticks below to five ticks above the price of the real order. Each of the other ten matchers performs the calculations and generates the messages involved with one of the ten speculative orders.

In another embodiment, the match engine 100 may decide how many matchers to use based on a current market trend, an overall market trend, an economic indicator, a scheduled market event or a financial announcement. For example, when federal rate change announcement occurs, there is a general spike in activity, the computing resources that are normally dedicated to speculative orders may be better allocated to the calculation of real market data.

FIG. 1 illustrates match engine 100 comprising gatekeeper module 105, matcher 101 and matcher 103. Other embodiments may take advantage of parallel processing in which the various calculations may be carried simultaneously. Examples of systems that may employ parallel processing include a grid computing network, a cloud computing network, and a symmetric multiprocessing (SMP) computer architecture. In all examples, the function of gatekeeper 105 and may be performed by one or more of the match engines or by a centralized gatekeeper processor in the electronic trading system.

FIG. 2 illustrates an SMP implementation of a portion of the electronic trading system of FIG. 1. A series of any number of match engine processors including a first match engine processor 201, a second match engine processor 203, to an Nth match engine processor 205 may be connected to a single shared memory 207 via bus 209. The SMP computer architecture allows any of the processors to work on any task no matter where the data is located in memory 207. This is particularly suited for the parallel processing of speculative order because each matcher will require access to the order book for the financial instrument.

FIG. 3 illustrates a grid computing implementation of a portion of the electronic trading system of FIG. 1. Grid computing involves the collaboration of computing resources from various domains applied to a common task. A first computer 302 includes a first match engine processor 301, a network communication device 307 and a storage element 309. A second computer 304 includes a second match engine processor 303, a network communication device 307 and a storage element 309. Computers 302 and 304 are coupled by a network 305 such as Ethernet or the Internet. Storage element 309 may include both a permanent storage database and a random access memory. In one embodiment of the grid computing implementation, the first match engine processor 301 and the second match engine processor 303 may be responsible only for generating messages, while order matching is handled at a centralized point at the electronic trading system.

FIG. 4 illustrates a cloud computing implementation of a portion of the electronic trading system of FIG. 1. Cloud computing is a system in which computing resources are provided over the Internet. The computing resources may be purchased from a third party on the basis of usage, which avoids the high capital costs associated with a computer infrastructure. Cloud computing system 400 may include a first match engine processor 401 and a second match engine processor 403. In one embodiment of the cloud computing implementation, the first match engine processor 401 and the second match engine processor 403 may be responsible only for generating messages, while order matching is handled at a centralized point in the electronic trading system.

FIG. 5 illustrates a timing diagram of accelerated trade matching using speculative parallel processing. The horizontal axis includes the processors or modules involved in speculative parallel processing, including the gatekeeper processor 601, first match engine processor (matcher 1) 602, second match engine processor (matcher 2) 603, and third match engine processor (matcher 3) 604. Time is measured by the vertical axis.

Processing blocks 608 a-d, 610 a-b, 612 a-b, and 614 a-b illustrate the processing time required for various tasks by the processors or modules. Although not to scale, the relative size of Processing blocks 608 a-d, 610 a-b, 612 a-b, and 614 a-b indicates how much time is required.

When a new real order comes in, gatekeeper processor 601 requires a relatively small amount of time, processing block 608 a, to process the real order and assign it to match engine processor 602. Match engine processor 602 requires a relatively large amount of time, processing blocks 610 a and 610 b, to perform the calculations related to the trades and generation of the outgoing messages and updates based on the real order.

Processing block 610 a corresponds to the calculations related to the trade, and processing block 610 b corresponds to the generation of the outgoing messages. As soon as the calculations related to the trade are finished, the gatekeeper 601 may update the order book, as shown by processing block 608 b. When the order book is updated, the match engine has all the information necessary to begin working possible future trades.

Accordingly, at that time gatekeeper processor 601 can assign a speculative order (Price A) to the second match engine processor 603.

The second match engine processor 603 begins on the calculations related to the speculative order, as shown by processing block 612 a. Depending on the timing, the second match engine processor 603 may also complete the generation of the outgoing messages related to the speculative order, as shown by processing block 612 b.

By this time, the first match engine processor 602 has completed generation of the outgoing messages and updates based on the real order, as shown by processing block 610 b. If a new order comes in at price A, only the relatively small amount of processing, as shown by processing block 608 c, is needed because the second match engine 603 has already performed the calculations related to the speculative order at price A and generation of the outgoing messages and updates based on the speculative order. The new order can be instantaneously traded when it matches a speculative order.

At the same time that the gatekeeper processor 601 assigned speculative order at price A to the second match engine processor 603, gatekeeper processor 601 may also assign a second speculative order at price B to third match engine processor 604. Third match engine processor 604 is configured to perform the calculations related to the second speculative order, as shown by processing block 614 a, and generate the outgoing messages related to the second speculative order, as shown by processing block 614 b.

If a real order at price B is the next order received by gatekeeper processor 601, then the third match engine processor 604 would process it because it has already begun processing based on the second speculative order. However, in the case shown by FIG. 5, the next real order was at price A. The gatekeeper processor 601 will decide, as shown by processing block 608 d, to terminate the processing performed by the third match engine 604.

In one embodiment, the calculations and messages based on the speculative orders will be save for predetermined time, or indefinitely, in a storage element, such as storage element 309. When a new order that corresponds to the speculative order is received, some or all of the calculations and messages may be used based on the state of the order book at that time.

FIG. 6 illustrates a flow chart of one embodiment of accelerated trade matching using speculative parallel processing. The process begins at block S600. At S601, the match engine 100 or a validation module (not shown) validates a received request or order. The validation determines whether the request can be handled by the match engine 100. For example, match engine may not be capable of handling some quantities or some financial instruments, if such an order or request is received, it is processed at S617 and a message is returned to the requesting terminal or trading entity.

Otherwise, match engine 100 determines whether a matcher has already performed calculations based on a speculative order that corresponds to the received order at S603. If not, block S619 indicates that a matcher will be launched at the price. If so, the matcher that performed calculations for the speculative order is made active at S605. At block S607, gatekeeper 601 determines whether the matcher is already done processing. If not, the system waits at block S621. If so, the order is immediately processed and the order book is updated at S609. As the order book is updated, new speculative orders may be assigned to the matchers at S623 so that processing may begin on the next order to be received. Outgoing messages are generated and sent out at block S611.

At block S613, match engine 100 determines whether there is remaining quantity in the incoming order. If not, the process stops at S627. If so, the match engine 100 determines, at block S615, if there are other orders on the book at other price levels that can trade with the incoming order. If not, the matchers at all price levels are terminated at block S625 and the process ends. If so, the process returns to block S603 and repeats at the other price levels according to one of the allocation algorithms above.

FIG. 7 illustrates another embodiment of accelerated trade matching using speculative parallel processing. At block S701, match engine 100 or gatekeeper module 105 receives a real order. At block S703, the first match engine processor 101 calculates tradable combinations involving the real order. At block S705, a second match engine processor 103 calculates tradable combinations involving at least one speculative order. At block S707, match engine 100 executes a trade based on at least one of the tradable combinations involving the real order or at least one of the tradable combinations involving the at least one speculative order. At block S709, match engine 100 outputs an update to an order book based on the trade.

The disclosed embodiments, including match engine 100, describe a system capable of receiving bids and offers and otherwise managing the execution of trades in a marketplace, such as those provided by Chicago Mercantile Exchange Inc., (CME Group) located in Chicago, Ill. However, the embodiments disclosed herein are applicable to any trading or futures market in the United States or elsewhere in the world, for example, the Chicago Board of Trade (CBOT), the Bolsa de Mercadorias e Futoros in Brazil (BMF), the London International Financial Futures Exchange, the New York Mercantile Exchange (NYMEX), the Kansas City Board of Trade (KCBT), MATIF (in Paris, France), the London Metal Exchange (LME), the Tokyo International Financial Futures Exchange, the Tokyo Commodity Exchange for Industry (TOCOM), the Meff Renta Variable (in Spain), the Dubai Mercantile Exchange (DME), and the Intercontinental Exchange (ICE).

The steps, elements and processes discussed herein may be encoded as program logic, computer readable code and/or instructions. These encoded elements, in turn, may be stored or embedded on a computer readable medium such as, for example, a hard disk drive, a solid state drive or other storage medium. The computer readable medium may be in communication with a processor which, in response to an appropriate input or command, may execute the program logic stored on the computer readable medium. The execution of this program logic may result in the execution of the step, elements and processes embodied and discussed herein.

It should be understood that various changes and modifications to the presently preferred embodiments described herein will be apparent to those skilled in the art. Such changes and modifications can be made without departing from the teachings of the present invention and without diminishing its intended advantages. It is therefore intended that such changes and modifications be covered by the appended claims. 

We claim:
 1. A computer implemented method of matching orders, the method comprising: receiving, by a processor operative to execute program logic stored on a computer readable medium, a first real order; generating, by the processor responsive to a determination that the first real order has not been filled by one or more previously received but unfilled orders counter thereto, at least one speculative order which corresponds to at least one other real order that is counter to the first real order and which is predicted to be, but not yet, received; commencing, by the processor based on the at least one speculative order, performance of at least a portion of calculations involved with matching the first real order with the yet-to-be received corresponding at least one other real order, as if it had been received, and generating a plurality of messages associated therewith; receiving, by the processor subsequent to at least the generating of the at least one speculative order, a second real order corresponding to one of the at least one speculative order; and executing, by the processor, a trade based on the second real order and the first real order, the executing comprising utilizing the plurality of messages generated by the processor.
 2. The method of claim 1, further comprising: determining, by the processor, a price of the at least one speculative order based on a price of the first real order.
 3. The method of claim 2 wherein the price of the at least one speculative order differs from the price of the first real order by a multiple of price ticks.
 4. The method of claim 1, further comprising: determining, by the processor, a price of the at least one speculative order based on a trend of the market or a trend of a financial instrument underlying the first real order, based on economic indicators, based on a statistical analysis or based on a scheduled market event or a financial announcement.
 5. The method of claim 1, wherein each of the at least one speculative order differs from another of the at least one speculative order by price, quantity and/or type of instrument, each corresponding to potential variation of a real order counter to the first order which may possibly be received.
 6. The method of claim 5, wherein the differences between each of the at least one speculative order are randomly determined.
 7. The method of claim 1 wherein the number of speculative orders generated is based on a defined probability of one of receiving the second real order within a defined period of time subsequent to receipt of the first real order.
 8. The method of claim 1, wherein the plurality of messages include messages to be delivered to at least one trading entity, to an exchange or to a market data server.
 9. An electronic trading system comprising: a match engine processor, operative to execute program logic stored on a computer readable medium, for receiving a first real order, generating, responsive to a determination that the first real order has not been filled by one or more previously received but unfilled orders, at least one speculative order which corresponds to at least one other real order that is counter to the first real order and which is predicted to be, but not yet, received, and performing, based on the at least one speculative order, at least a portion of calculations involved with matching the first real order with the yet-to-be received corresponding at least one other real order, as if it had been received, and generating a plurality of messages associated therewith; and a gatekeeper processor, operative to execute program logic stored on a computer readable medium, in communication with both the match engine processor for executing, upon receipt of a second real order subsequent to at least the generation of the at least one speculative order which corresponds thereto, a trade between the first real order and the second real order utilizing the previously generated plurality of messages.
 10. The electronic trading system of claim 12, wherein a price of the at least one speculative order is based on a price of the first real order.
 11. The electronic trading system of claim 12, wherein the price of the at least one speculative order differs from the price of the first real order by a multiple of price ticks.
 12. The electronic trading system of claim 12, wherein a price of the speculative order is based on a trend of the market or a trend of a financial instrument underlying the first real order, based on economic indicators, based on a statistical analysis, or based on a scheduled market event or a financial announcement.
 13. The electronic trading system of claim 12, wherein each of the at least one speculative order differs from another of the at least one speculative order by price, quantity and/or type of instrument, each corresponding to potential variation of a real order counter to the first order which may possibly be received.
 14. The electronic trading system of claim 12, wherein the differences between each of the at least one speculative order are randomly determined.
 15. The electronic trading system of claim 12, wherein wherein the number of speculative orders generated is based on a defined probability of one of receiving the second real order within a defined period of time subsequent to receipt of the first real order.
 16. The electronic trading system of claim 12, wherein the plurality of messages include messages to be delivered to at least one trading entity, to an exchange, or to a market data server.
 17. The electronic trading system of claim 12, wherein the plurality of messages include messages to be published comprising information related to price or quantity.
 18. The electronic trading system of claim 12, wherein the match processor is part of a grid computing network, a cloud computing network, or a symmetric multiprocessing computer architecture.
 19. A computer implemented match engine comprising: a processor operative to execute program logic stored on a computer readable medium, a first matcher module implemented by the processor for receiving a first real order, and determining, based thereon, if the first real order has been filled by one or more previously received but unfilled orders counter thereto; a second matcher module implemented by the processor for: generating, responsive to the determination that the first real order has not been filled, at least one speculative order which corresponds to at least one other real order that is counter to the first real order and which is predicted to be, but not yet, received; commencing, based on the at least one speculative order, performance of calculations involved with matching the yet-to-be-received at least one other order and the first real order as if it had been received; and generating a plurality of outgoing messages based thereon; and a gatekeeper module implemented by the processor for executing, upon receipt of a second real order subsequent to at least the generation of the at least one speculative order which corresponds thereto, a trade between the first real order and the second real order utilizing the plurality of outgoing messages.
 20. A computer implemented method of matching orders, the method comprising: receiving, by a processor operative to execute program logic stored on a computer readable medium, a first real order; pre-calculating, by the processor based on a determination that the first real order has not been filled by one or more previously received but unfilled orders counter thereto, one more matched trades between the first real order and one or more speculative real orders counter to the first real order which may potentially be later received and pre-generating a plurality of messages associated with each of the one or more pre-calculated matched trades; and executing, by the processor upon receipt of a second real order corresponding to one of the one or more speculative real orders, a trade between the second real order and the first real order utilizing the pre-generated plurality of messages associated with the pre-calculated matched trade between the corresponding one of the one of more speculative real orders and the first real order. 